package apiday02;

import java.util.Scanner;

public class RegDemo06 {
    public static void main(String[] args) {
        String reg = "\\d{1,3}(\\.\\d{1,3}){3}";
        Scanner scanner = new Scanner(System.in);
            for (;;){
                String s2 = scanner.nextLine();
                System.out.println(s2.matches(reg));
            }



    }
}
